package cn.iune.platform.dictionary;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

@Entity
@Table(name="TradeInfo",uniqueConstraints={
		@UniqueConstraint(columnNames={"tradeCode", "fParent"})
		,@UniqueConstraint(columnNames={"tradeName", "fParent"})
		})
@NamedQuery(name="TradeInfo.findAll", query="SELECT s FROM TradeInfo s")
public class TradeInfo {

	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=10)
	private String tradeCode;
	@Column(length=50)
	private String tradeName;
	
	@Column(length=256)
	private String tradeFullID;
	@Column(length=128)
	private String tradeFullCode;
	@Column(length=256)
	private String tradeFullName;

	private int nodeLevel = 0;
	@Column(length=32)
	private String nodeKind;
	@Column(length=50)
	private String sortNo;
	@Column(length=32)
	private String fParent;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	
	@Column(length=32)
	private String userId;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}


	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getTradeCode() {
		return tradeCode;
	}
	public void setTradeCode(String tradeCode) {
		this.tradeCode = tradeCode;
	}
	public String getTradeName() {
		return tradeName;
	}
	public void setTradeName(String tradeName) {
		this.tradeName = tradeName;
	}
	public String getTradeFullID() {
		return tradeFullID;
	}
	public void setTradeFullID(String tradeFullID) {
		this.tradeFullID = tradeFullID;
	}
	public String getTradeFullName() {
		return tradeFullName;
	}
	public void setTradeFullName(String tradeFullName) {
		this.tradeFullName = tradeFullName;
	}
	public String getTradeFullCode() {
		return tradeFullCode;
	}
	public void setTradeFullCode(String tradeFullCode) {
		this.tradeFullCode = tradeFullCode;
	}
	public int getNodeLevel() {
		return nodeLevel;
	}
	public void setNodeLevel(int nodeLevel) {
		this.nodeLevel = nodeLevel;
	}
	public String getNodeKind() {
		return nodeKind;
	}
	public void setNodeKind(String nodeKind) {
		this.nodeKind = nodeKind;
	}
	public String getSortNo() {
		return sortNo;
	}
	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	public String getfParent() {
		return fParent;
	}
	public void setfParent(String fParent) {
		this.fParent = fParent;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}

	
}
